package com.lkl.hystrixdemo.order.service;

import com.lkl.hystrixdemo.order.mapper.UserMapper;
import com.lkl.hystrixdemo.order.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import java.util.List;

@Service
public class UserService {

    @Autowired
    UserMapper userMapper;

    public int addUser (User user) {
        int res = userMapper.addUser(user);
        return res;
    }
    public List<User> getUser () {
        return userMapper.findAllUser();
    }

}
